#include <iostream>

using namespace std;

//赋值运算符:用于将表达式的值赋给变量
int main() {
    int a = 10;//赋值
    cout << "a=" << a << endl;
    a += 2;//加等于a=a+2
    cout << "a=" << a << endl;
    a = 10;
    a -= 2;//减等于a=a-2
    cout << "a=" << a << endl;
    a = 10;
    a *= 2;//乘等于a=a*2
    cout << "a=" << a << endl;
    a = 10;
    a /= 2;//除等于a=a/2
    cout << "a=" << a << endl;
    a = 10;
    a %= 2;//模等于a=a%2
    cout << "a=" << a << endl;
    return 0;
}

